package lt.marsrutai.mobile.android.model.enums;

public enum TrackType {
    NORMAL("1"), CHANGED("2"), SHORTENED("3");

    private String value;

    TrackType(String value) {
        this.value = value;
    }

    public static TrackType parseEnum(String string) {
        for (TrackType type: values()) {
            if (type.toString().equals(string)) {
                return type;
            }
        }

        throw new IllegalArgumentException("Cannot parse enum from " + string);
    }

    @Override
    public String toString() {
        return value;
    }
}
